using System;
using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Requests.Objects;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Requests
{
	public static class EntityOrderDetailsCreateExtend
{
		public static OrderDetails ToCreateEntity(this RequestOrderDetailsDto dto)
		{
			return new OrderDetails
			{
				OdProductId = dto.productId,
				OdCutomerOrderId = dto.cutomerOrderId,
				OdCount = dto.count,
				OdProductName = dto.productName,
				OdSinglePrice = dto.singlePrice,
				OdProductPrice = dto.productPrice,
				OdProductPayPrice = dto.productPayPrice,
				OdDiscount = dto.discount,
				OdDeduction = dto.deduction,
			};
		}
	}
}
